<template>
  <el-form :model="userLoginData" :rules="rules" ref="formRef">
    <el-form-item label="用户名" prop="username">
      <el-input v-model="userLoginData.user_name"></el-input>
    </el-form-item>
    <el-form-item label="密码" prop="password">
      <el-input type="password" v-model="userLoginData.user_password"></el-input>
    </el-form-item>
    <el-form-item label="确认密码" prop="confirmPassword">
      <el-input type="password" v-model="userLoginData.user_password"></el-input>
    </el-form-item>
    <el-form-item>
      <el-button type="primary" @click="UserModifyPassword(userLoginData, formRef, router)"
        >修改</el-button
      >
    </el-form-item>
  </el-form>
</template>

<script setup>
import { useRouter } from 'vue-router'
import { userModules } from '../../../stores/userModulsStore'

const router = useRouter()
const { rules, form, formRef, userLoginData, useLoginHttp, useRegisterHttp, UserModifyPassword } =
  userModules()
</script>

<style lang="less" scoped>
// @import: '../styles/modfiy.css';
.form-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

.el-form {
  width: 400px;
  background-color: #fff;
  padding: 20px;
  border-radius: 5px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

.el-form-item {
  margin-bottom: 20px;
}

.el-button {
  width: 100%;
}

.form-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}
</style>
